<template>
  <rx-dialog @handOk="handleOk" :oktext="$ti18('rxForm.closeBtn','关闭')" :showcancel="false">
    <a-textarea v-model="sql" style="height:350px;"/>
  </rx-dialog>
</template>

<script>
  import {RxDialog, Util} from "@lowcode/jpaas-common-lib"

  export default {
    name: "SysDicSql",
    props: ["nodeAlias", "layerid", "destroy"],
    components: {
      RxDialog
    },
    data() {
      return {
        sql: ""
      }
    },
    created() {
      this.sql = "SELECT * FROM sys_dic WHERE tree_id_ IN (SELECT tree_id_ FROM sys_tree t " +
          "WHERE t.alias_='" + this.nodeAlias + "' AND t.cat_key_='DIC') ORDER BY sn_ ASC";
    },
    methods: {
      handleOk() {
        Util.closeWindow(this, "ok");
      }
    }
  }
</script>

<style scoped>

</style>